We must emit the cancel event with the same semantics, and towards the GdkWindow
that is currently under the touchpoint, so make proxy_button_event() deal with
GDK_TOUCH_CANCEL.
Fixes the GDK_TOUCH_CANCEL event being emitted only on the toplevel, which is
usually non-sufficient.
type == GDK_BUTTON_RELEASE ||
type == GDK_TOUCH_BEGIN ||
type == GDK_TOUCH_END ||
+ type == GDK_TOUCH_CANCEL ||
type == GDK_SCROLL;
}
case GDK_TOUCH_BEGIN:
case GDK_TOUCH_END:
+ case GDK_TOUCH_CANCEL:
convert_toplevel_coords_to_window (event_win,
toplevel_x, toplevel_y,
&event->button.x, &event->button.y);
gdk_event_set_source_device (event, source_device);
- if ((type == GDK_TOUCH_END &&
+ if (((type == GDK_TOUCH_END || type == GDK_TOUCH_CANCEL) &&
_gdk_event_get_pointer_emulated (source_event)) &&
pointer_window == pointer_info->window_under_pointer &&
gdk_device_get_source (source_device) == GDK_SOURCE_TOUCHSCREEN)